{include file="inc/header.html"} 
<?php
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/order_list.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/order_list.js";
$this->_var['dpagecss'][] = $this->_var['TMPL_REAL']."/css/account.css";
?>
<link rel="stylesheet" type="text/css" href="{function name="parse_css" v="$dpagecss"}" />
<script type="text/javascript" src="{function name="parse_script" v="$dpagejs" c="$dcpagejs"}"></script>
<div class="blank"></div>

<div class="shadow_bg">
	<div class="wrap white_box"">
		<div class="page_title">
			支持的项目
		</div>
		<div class="switch_nav">
			<ul>
				<li class="current"><a href="{url r="account#index"}">支持的项目</a></li>
				<li><a href="{url r="account#project"}">我的项目</a></li>
				<li><a href="{url r="account#focus"}">关注的项目</a></li>
				<li><a href="{url r="account#credit"}">收支明细</a></li>
				
			</ul>
		</div>
		
		<div class="blank"></div>
		
		{include file="inc/money_box.html"} 
		
		<div class="full">
		{if $order_list}
		<table class="data-table">
			<tr>
				<th>项目名称</th>
				<th width="50">金额</th>
				<th width="50">运费</th>
				<th width="120">状态</th>
				<th width="120">操作</th>
			</tr>
			{foreach from=$order_list item=order_item}
			<tr>
				<td class="deal_name">
				{if $order_item.deal_info}
					<div><a href="{url r="deal#show" p="id=$order_item.deal_id"}" target="_blank" title="{$order_item.deal_name}"><img src="{function name="get_spec_image" v=$order_item.deal_info.image w=50 h=50 g=1}"  alt="{$order_item.deal_name}"/></a></div>	
					<div><a href="{url r="deal#show" p="id=$order_item.deal_id"}" target="_blank" title="{$order_item.deal_name}">{function name="msubstr" v=$order_item.deal_name b=0 e=25}</a></div>	
				{else}
					<div><span title="{$order_item.deal_name}">{function name="msubstr" v=$order_item.deal_name b=0 e=25}</span></div>	
				{/if}
				</td>
				<td>
					{function name="format_price" v=$order_item.deal_price}
				</td>
				<td>
					{if $order_item.delivery_fee eq 0}
					--
					{else}
					{function name="format_price" v=$order_item.delivery_fee}
					{/if}
				</td>
				<td>			
					{if $order_item.order_status eq 0}
					已用余额支付{function name="format_price" v=$order_item.credit_pay}<br />剩余支付未完成
					{else}		
					{if $order_item.deal_info}
				
							{if $order_item.deal_info.is_success eq 1}
								{if $order_item.deal_info.begin_time > $now}未开始{/if}
								{if $order_item.deal_info.end_time < $now and $order_item.deal_info.end_time neq 0}已成功&nbsp;{if $order_item.repay_time gt 0}回报已发放{else}等待发放回报{/if}{/if}
								{if $order_item.deal_info.begin_time < $now and ($order_item.deal_info.end_time > $now or $order_item.deal_info.end_time eq 0)}已成功&nbsp;{if $order_item.repay_time gt 0}回报已发放{else}等待发放回报{/if}{/if}
							{else}
								{if $order_item.deal_info.begin_time > $now}未开始{/if}
								{if $order_item.deal_info.end_time < $now and $order_item.deal_info.end_time neq 0}未成功&nbsp;{if $order_item.is_refund eq 1}已退款{else}等待退款{/if}{/if}
								{if $order_item.deal_info.begin_time < $now and ($order_item.deal_info.end_time > $now or $order_item.deal_info.end_time eq 0)}未结束{/if}
							{/if}
				
					{else}
						{if $order_item.is_success eq 0}
						未成功&nbsp;{if $order_item.repay_time gt 0}回报已发放{else}等待发放回报{/if}
						{else}
						已成功&nbsp;{if $order_item.is_refund eq 1}已退款{else}等待退款{/if}
						{/if}
					{/if}
					{/if}
				</td>
				<td>
					{if $order_item.order_status eq 0}
						<a href="{url r="account#view_order" p="id=$order_item.id"}">继续支付</a>
						<a href="{url r="account#del_order" p="id=$order_item.id"}" class="del_deal">删除</a>
					{else}
						<a href="{url r="account#view_order" p="id=$order_item.id"}">查看详情</a>
					{/if}
				</td>
			</tr>
			{/foreach}
		</table>
		
		{else}
		<div class="empty_tip">
			还没有任何支持记录
		</div>
		{/if}
		
		</div>
		<div class="blank"></div>
		<div class="pages">{$pages}</div>
		<div class="blank"></div>
		
		<div class="blank"></div>
		
	</div>
</div>
<div class="blank"></div>
{include file="inc/footer.html"} 